| Conditions | 2 |
| Paths | 2 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | // spec/index.spec.js |
||
| 30 | describe("ejsception | @egalabs/exception", () => { |
||
| 31 | |||
| 32 | // :: VARIABLES |
||
| 33 | |||
| 34 | let key; |
||
| 35 | const test = (() => ejsception[key] = 0); |
||
| 36 | const suite = (() => { |
||
| 37 | expect(ejsception[key]).toEqual(local[key]); |
||
| 38 | expect(ejsception[key].prototype).toEqual(local[key].prototype); |
||
| 39 | }); |
||
| 40 | |||
| 41 | // :: TESTING |
||
| 42 | |||
| 43 | it("should me immutable", () => { |
||
| 44 | for (let i = 0; i < classes.length; i += 1) { |
||
| 45 | key = classes[i]; |
||
| 46 | expect(test).toThrowErrorOfType("TypeError"); |
||
| 47 | } |
||
| 48 | }); |
||
| 49 | |||
| 50 | // test all 'classes' |
||
| 51 | for (let i = 0; i < classes.length; i += 1) { |
||
| 52 | key = classes[i]; |
||
| 53 | it("should have a " + key + " 'class'", suite); |
||
| 54 | } |
||
| 55 | |||
| 56 | }); |